package lx;

import java.util.Scanner;

public class jqcsrq {
    String year;
    String month;
    String day;
    static String id;
    @SuppressWarnings("resource")
    public void InputId() {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入你的身份证号：");
        id = sc.nextLine();
    }
    public void CutId(String id){
        year = id.substring(6, 10);// 截取年
        month = id.substring(10, 12);// 截取月份
        day = id.substring(12, 14);// 截取天

    }
    public String toString(){
        return "你的生日是：" + year + " 年 " + month + " 月 " + day + " 日";
    }
    public static void main(String[] args) {
        jqcsrq peopleId = new jqcsrq();
        peopleId.InputId();
        peopleId.CutId(id);
        System.out.println(peopleId.toString());
    }

}

